//
//  MCGoodsDetailDescribeTopView.swift
//  StoreManage
//
//  Created by MC on 2018/2/6.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit

class MCGoodsDetailDescribeTopView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        self.frame = CGRect.init(x: 0, y: 0, width: 0, height: MCScreenWidth + 40)
        self.backgroundColor = UIColor.white
        
        self.addSubview(cycleScrollView)
        cycleScrollView.snp.remakeConstraints { (make) ->Void in
            make.left.right.top.equalTo(self)
            make.height.equalTo(MCScreenWidth)
        }
        
        self.addSubview(titleButton)
        titleButton.snp.remakeConstraints { (make) ->Void in
            make.centerX.equalTo(self)
            make.top.equalTo(cycleScrollView.snp.bottom)
            make.height.equalTo(40)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    
    lazy var cycleScrollView: SDCycleScrollView = {
        
        let cycleScrollView = SDCycleScrollView.init(frame: CGRect.zero, delegate: nil, placeholderImage: UIImage.init(color: UIColor.MCGray_light))
        cycleScrollView?.autoScrollTimeInterval = 3
        cycleScrollView?.pageControlDotSize = CGSize.init(width: 5, height: 5);
        return cycleScrollView!
    }()
    
    private lazy var titleButton: UIButton = {
        let button = UIButton.init(type: UIButtonType.custom)
        button.setTitle("商品详情", for: UIControlState.normal)
        button.setTitleColor(UIColor.black, for: UIControlState.normal)
        button.titleLabel?.font = MCFont(14)
        return button
    }()
}



